<div class="content">
<style>
tr.isdel td{color:#ddd;}
</style>
	<?php
	$tools = array();
	echo n_mod('skin')->pageHead("站点监控",$tools)
	?>


	<div class="n-sep">
	<table class="n-table n-size-full">
		<tbody>
		<tr>
			<th>站点</th>
			<th>scode</th>
			<th>每日请求数</th>
			<th>最大并发数</th>
			<th>操作</th>
		</tr>
		<?php
		if(!empty($data['siteList'])){
			foreach($data['siteList'] as $key=>$val){
		?>
		<tr<?='Y'==$val['isdel']?' class="isdel"':''?>>
			<td><?=$val['name']?></td>
			<td><?=$val['scode']?></td>
			<?php
			if (ceil($data['nsiteQrytotal'][$val['scode']]*100/$data['spackageList'][$val['scode']]['qry_total'])>50) {
			?>
			<td style="background-color: #EE688E;">
			<?php	
			}else{
			?>
			<td>
			<?php
			}
			?>
			<?=intval($data['nsiteQrytotal'][$val['scode']])?>/<?=$data['spackageList'][$val['scode']]['qry_total']?>
			</td>
			<?php
			if (ceil($data['nsiteRequest'][$val['scode']]*100/$data['spackageList'][$val['scode']]['cmpt_total'])>50) {
			?>
			<td style="background-color: #EE688E;">
			<?php	
			}else{
			?>
			<td>
			<?php
			}
			?>
			
			<?=intval($data['nsiteRequest'][$val['scode']])?>/<?=$data['spackageList'][$val['scode']]['cmpt_total']?></td>
			<td>
			<a href="javascript:;" onclick="ui.open('<?=n_url('spackage','restCache',array('scode'=>$val['scode']))?>');">重置并发数</a>
				<a href="javascript:;" onclick="ui.open('<?=n_url('spackage','siteSpackageEdit',array('id'=>$data['spackageList'][$val['scode']]['id']))?>');">修改请求数</a>
			</td>
	
		</tr>
		<?php
			}
		}else{
		?>
		<tr>
			<td colspan="5">暂无数据</td>
		</tr>	
		<?php
		}
		?>
		</tbody>
	</table>		
	</div>
</div>